package com.haisen.dataobject.query;

import com.alibaba.fastjson.JSON;
import com.haisen.core.utils.BaseQuery;
import com.haisen.core.utils.DateUtil;
import com.haisen.dataobject.entity.BussItem;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

@Data
@Slf4j
public class BussItemQuery extends BaseQuery<BussItem>{

    private String searchDate;
    private String phone;
    //单元编码
    private String organizationNo;
    //员工姓名
    private String employer;

    /**
     * 转换后的开始日期和结束日期
     */
    private String beginDate;
    private String endDate;

    public String getSearchDate() {
        return searchDate;
    }

    public void setSearchDate(String searchDate) {
        beginDate = DateUtil.splitDateRange(searchDate).get("begin");
        endDate = DateUtil.splitDateRange(searchDate).get("end");
    }


}
